﻿
//

//


using EMSNet.Core;
using System.ComponentModel.DataAnnotations;

namespace EMSNet.Service;

/// <summary>
/// 能源字典基础输入参数
/// </summary>
public class EmsDictionaryBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 父Id
    /// </summary>
    public virtual long? pid { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    public virtual string? name { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    public virtual string? code { get; set; }
    
}

/// <summary>
/// 能源字典分页查询输入参数
/// </summary>
public class PageEmsDictionaryInput : BasePageInput
{
    /// <summary>
    /// 父Id
    /// </summary>
    public long? pid { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    public string? name { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    public string? code { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 能源字典增加输入参数
/// </summary>
public class AddEmsDictionaryInput
{
    /// <summary>
    /// 父Id
    /// </summary>
    [MaxLength(32, ErrorMessage = "父Id字符长度不能超过32")]
    public string? pid { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "名称字符长度不能超过32")]
    public string? name { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "编码字符长度不能超过32")]
    public string? code { get; set; }
    
}

/// <summary>
/// 能源字典删除输入参数
/// </summary>
public class DeleteEmsDictionaryInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 能源字典更新输入参数
/// </summary>
public class UpdateEmsDictionaryInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 父Id
    /// </summary>    
    [MaxLength(32, ErrorMessage = "父Id字符长度不能超过32")]
    public string? pid { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "名称字符长度不能超过32")]
    public string? name { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "编码字符长度不能超过32")]
    public string? code { get; set; }
    
}

/// <summary>
/// 能源字典主键查询输入参数
/// </summary>
public class QueryByIdEmsDictionaryInput : DeleteEmsDictionaryInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataEmsDictionaryInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 能源字典数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportEmsDictionaryInput : BaseImportInput
{
    /// <summary>
    /// 父Id 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? pid { get; set; }
    
    /// <summary>
    /// 父Id 文本
    /// </summary>
    [ImporterHeader(Name = "父Id")]
    [ExporterHeader("父Id", Format = "", Width = 25, IsBold = true)]
    public string pFkDisplayName { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    [ImporterHeader(Name = "名称")]
    [ExporterHeader("名称", Format = "", Width = 25, IsBold = true)]
    public string? name { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    [ImporterHeader(Name = "编码")]
    [ExporterHeader("编码", Format = "", Width = 25, IsBold = true)]
    public string? code { get; set; }
    
}
